/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author vladi
 */

import java.io.*;
import java.net.*;
import java.util.*;

public class WebServer {

    public static void main( String args[]) throws Exception
    {
        int porta = 1234;
        ServerSocket servidor = new ServerSocket(porta);
        HttpRequest httpserver;
        Socket bemvindo;
        while(true)
        {
            bemvindo = servidor.accept();
            httpserver = new HttpRequest(bemvindo);
            Thread thread = new Thread(httpserver);
            thread.start();
        }
    }
}
